<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <script src="//api.map.baidu.com/api?v=1.0&&type=webgl&ak=p07Q22uzDZR0jBnTIIbfy7ukOUBRlQhr"></script>
  <title>Map Demo</title>
  <style>
    html{height:100%}    
    body{height:100%;margin:0px;padding:0px}    
    #container{height:100%}

    .top-tool-wrapper {
      position: absolute;
      box-sizing: border-box;
      top: 24px;
      width: 100%;
      height: 40px;
      display: flex;
      padding: 0 24px;
      z-index: 99;
      /* background-color: red; */
      pointer-events: none;
    }
    
    .top-tool-wrapper .button {
      pointer-events: auto;
      height: 40px;
      line-height: 40px;
      cursor: pointer;
      padding: 0 24px;
      background-color: #409EFF;
      color: #fff;
      box-shadow: 0 2px 4px 0 rgba(0,0,0,.12);
      border-radius: 4px;
      user-select:none;
    }

    .top-tool-wrapper .button:hover {
      background-color: #53a8fc;
    }
    .top-tool-wrapper .button+.button {
      margin-left: 16px;
    }
    .flex-spacer {
      flex: 1;
    }
  </style>
</head>
<body>
  <div id="container"></div>

  <div class="top-tool-wrapper">
    <div class="button" onclick="alert('test')">test</div>
    <div class="button" onclick="alert('test')">test</div>
    <div class="button" onclick="alert('test')">test</div>
    <div class="button" onclick="alert('test')">test</div>
    <div class="button" onclick="alert('test')">test</div>
    <div class="flex-spacer"></div>
    <div class="button" onclick="alert('test')">test</div>
  </div>

  <script>
    var map = new BMapGL.Map("container");
    map.centerAndZoom(new BMapGL.Point(116.404, 39.915), 11);  // 初始化地图,设置中心点坐标和地图级别
	  map.enableScrollWheelZoom(true);     //开启鼠标滚轮缩放
  </script>
</body>
</html>